package com.supcon.exchangedata.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Async;


/**
 * @author ：icerain.gan
 * @date ：Created in 2020/3/12 13:38
 * @description：定时任务处理
 * @modified By：
 * @version: 1.0$
 */
@Async
@Configuration
@Slf4j
public class ScheduledJob {



    /**
     * 定人任务处理应急事件数据传输
     * @throws Exception
     */
//    @Async
//    @Scheduled(cron = "0 0/10 * * * ?")
//    public void eventTransportJob() throws Exception {
//        log.info("当前线程={}，应急处理数据同步定时任务启动={}", Thread.currentThread().getId(), LocalDateTime.now());
//        emEventTranSportService.emEventDataTransport(null);
//    }
//
//    /**
//     * 保修事件数据传输
//     * @throws Exception
//     */
//    @Async
//    @Scheduled(cron = "0 0/10 * * * ?")
//    public void repairSportJob() throws Exception {
//        log.info("当前线程={}，报修事件数据同步定时任务启动={}", Thread.currentThread().getId(), LocalDateTime.now());
//        repairTranSportService.repairDataTransport(null);
//    }
//    /**
//     * 应急预案数据传输
//     * @throws Exception
//     */
//    @Async
//    @Scheduled(cron = "0 0/10 * * * ?")
//    public void eventPlanSportJob() throws Exception {
//        log.info("当前线程={}，应急预案数据同步定时任务启动={}", Thread.currentThread().getId(), LocalDateTime.now());
//        emEventTranSportService.emEventPlanDataTransport(null);
//    }

    /**
     * 环境历史数据同步
     */
//    @Async
//    @Scheduled(cron = "0 0/10 * * * ?")
//    public void realTimeValueSportJob(){
//        log.info("当前线程={}，环境历史数据同步定时任务启动={}", Thread.currentThread().getId(), LocalDateTime.now());
//        readRealTimeService.readRealTimeValueTransport();
//    }

//    @Async
//    @Scheduled(cron = "0 0 0/1 * * ?")
//    public void ArealalarmTranSportJob() throws Throwable {
//        arealalarmTranSportService.dealDataBeforeNetConnected();
//    }

}
